【享說APP語音聊天交友】不用高階顯卡!任何裝置都能使用 Google colab 免費玩 Stable Diffusion 作出擬真美女圖片教學!iPhone、Android、筆電、Mac 均適用


【享說APP語音聊天交友】





相信大家最近應該在 FB、IG、推特等社交平台看到一堆用 AI 畫的「超像真人」的美女照,其實她們都是使用 Stable Diffusion 這個 AI 繪圖工具所產生的,之前阿達分享過一片如何使用 Stable Diffusion 與 Midjourney 製作 AI 美圖的教學,當時阿達有提到 Midjourney 不是免費的,但它不需要電腦透過雲端就能算圖(強調一下不是畫圖),Stable Diffusion 則是很吃使用者的電腦配置,原則上你的電腦不是 NVIDIA 獨顯記憶體小於 4~6GB 的話其實是跑不動的,而且也沒法控制姿勢,這些才一個多月前的分享因為 Stable Diffusion 開源與眾多大神的努力下,現在已經都打阿達自己的臉了。今天就教大家如何只要透過瀏覽器透過 Google colab 服務,不管你使用任何裝置,PC、筆電、Mac甚至 iPhone 或 Android 手機都能雲端免費算圖的方法,快點學起來吧!




04792-1239331480-1 girl, masterpiece, best quality, (photorealistic_1.5),  (realistic_1.4), real, temptation light smile, attractive eyes, (show

 


04792-1239331480-1 girl, masterpiece, best quality, (photorealistic_1.5), (realistic_1.4), real, temptation light smile, attractive eyes, (show


使用 Google colab 免費玩 Stable Diffusion



首先開啟瀏覽器,開啟「https://github.com/camenduru/stable-diffusion-webui-colab」,往下就會看到很多 ipynb 結尾的腳本:




使用 Google colab 免費玩 Stable Diffusion - 01

 


使用 Google colab 免費玩 Stable Diffusion - 01


往下滾動有好幾十個大神製作,可執行對應模型的腳本,不同模型指的是不同畫風、風格,只要點擊就會自動跳到 Google Colab 頁面:




使用 Google colab 免費玩 Stable Diffusion - 02

 


使用 Google colab 免費玩 Stable Diffusion - 02


這邊分享一下阿達自己的模型,大家可以自己去對照,其中最流行的真人畫風是 ChilloutMix,這個作者採用大量的韓星與亞洲女性訓練,所以作出來的非常逼近真人,這次也以這個模型舉例:




使用 Google colab 免費玩 Stable Diffusion - 03

 


使用 Google colab 免費玩 Stable Diffusion - 03


接著會進入到 Google colab 頁面(沒有Google帳號要先註冊),接著執行畫面上的「OPEN IN Colab」圖示就會在雲端使用 Google 主機的資源(CPU、GPU、空間)架設一個最基本功能的雲端虛擬 Stable Diffusion 主機:




使用 Google colab 免費玩 Stable Diffusion - 04

 


使用 Google colab 免費玩 Stable Diffusion - 04


為什麼說是最基本呢?因為在這個畫面左上角點擊「MAIN」可以選擇使用 V2.0 架構的 Stable Diffusion,主要多了 ControlNet 這類高階功能,不過因為這個功能太進階,有興趣的朋友可以去看這篇,這邊不多做說明,以免連基本都還沒學會就想飛上天:




使用 Google colab 免費玩 Stable Diffusion - 05

 


使用 Google colab 免費玩 Stable Diffusion - 05


接下來就是準備執行腳本,在這個畫面的左側有一個 Play 按鍵,按下去就會開始運行:




使用 Google colab 免費玩 Stable Diffusion - 06

 


使用 Google colab 免費玩 Stable Diffusion - 06


運行腳本前會跳警告,選擇「繼續運行」(怕的話就不要玩算圖):




使用 Google colab 免費玩 Stable Diffusion - 07

 


使用 Google colab 免費玩 Stable Diffusion - 07


接著原本的 Play 鍵就會開始滾動同時下方也會開始運行腳本,這邊需要等待約十分鐘左右(因為 Google Colab 要由雲端下載 Stable Diffusion、模型,還要跑起來,所以沒法度加快):




使用 Google colab 免費玩 Stable Diffusion - 08

 


使用 Google colab 免費玩 Stable Diffusion - 08


等十分鐘左右後,在該頁面的下方就會出現三個連結,直接點擊第二個,只要有這個連結任何設備都能雲端操控 Stable Diffusion:




使用 Google colab 免費玩 Stable Diffusion - 09

 


使用 Google colab 免費玩 Stable Diffusion - 09


接著你就會看到 Stable Diffusion 的基本介面,在此可以輸入正面Prompt、負面Prompt,簡單說就是你希望 AI 畫出什麼、不要在畫作裡出現什麼,也是網路上常說的「咒語」:




使用 Google colab 免費玩 Stable Diffusion - 10

 


使用 Google colab 免費玩 Stable Diffusion - 10


想更加瞭解 Prompt 怎麼使用的人可以看阿達之前的教學影片(點擊或播放就會到說明的片段):



[embed]https://youtu.be/c5xeERCwHgM?t=1212[/embed]



下方的敘述則是圖片寬度、高度、產生幾張圖等設定,如果你算出來的人物臉崩了再勾選 Restore Face,不然我個人不建議勾選:




使用 Google colab 免費玩 Stable Diffusion - 11

 


使用 Google colab 免費玩 Stable Diffusion - 11


接著阿達使用自己常用的敘述填進去(正面):




(8k, RAW photo, best quality, masterpiece:1.2), (realistic, photo-realistic:1.4), ultra-detailed, (Kpop idol),perfect detail , looking at viewer,make up,)、(負面:paintings,sketches, (worst quality:2), (low quality:2), (normal quality:2), lowres, normal quality, ((monochrome)), ((grayscale)), skin spots, acnes, skin blemishes, bad anatomy,(long hair:1.4),DeepNegative,(fat:1.2),facing away, looking away,tilted head, {Multiple people}, lowres,bad anatomy,bad hands, text, error, missing fingers,extra digit, fewer digits, cropped, worstquality, low quality, normal quality,jpegartifacts,signature, watermark, username,blurry,bad feet,cropped,poorly drawn hands,poorly drawn face,mutation,deformed,worst quality,low quality,normal quality,jpeg artifacts,signature,watermark,extra fingers,fewer digits,extra limbs,extra arms,extra legs,malformed limbs,fused fingers,too many fingers,long neck,cross-eyed,mutated hands,polar lowres,bad body,bad proportions,gross proportions,text,error,missing fingers,missing arms,missing legs,extra digit, extra arms, extra leg, extra foot,)




接著就執行「Generate」產生圖片:




使用 Google colab 免費玩 Stable Diffusion - 12

 


使用 Google colab 免費玩 Stable Diffusion - 12


稍等一段時間(用時多久看你設定的解析度、採樣步數、算圖張數而定,越高就越久),在下方就會顯示算出來的圖片,是不是都很正?大家可以自己用英文加入其他敘述詞,想學的也一樣看阿達的影片比較快:




使用 Google colab 免費玩 Stable Diffusion - 13

 


使用 Google colab 免費玩 Stable Diffusion - 13


點擊任何一張就會顯示大圖,你可以直接右鍵存到電腦裡,也可以透過下方的 Download 下載到電腦裡,因為我們的 Google Colab 是免費的,所以圖片只會保存幾小時,連這個主機網址也會在不使用一段時間後失效,所以要存的話動作要快(覺得好用的話可以付費訂閱支持一下 Google):




使用 Google colab 免費玩 Stable Diffusion - 14

 


使用 Google colab 免費玩 Stable Diffusion - 14


使用 Google colab 免費玩 Stable Diffusion - 15

 


使用 Google colab 免費玩 Stable Diffusion - 15


以上的動作都可以透過手機執行,只要依照以上步驟或是點開有效的伺服器連結就可以直接輸入 Prompt 算圖:




IMG_9587

 


IMG_9587


IMG_9588

 


IMG_9588


[embed]https://www.kocpc.com.tw/archives/482719[/embed]



如何讀取高手作品來製作自己的美圖



看完剛剛的教學相信大家都學會了,不過相信很多人可能沒梗、英文不好,或是想模仿高手的圖片,這時候你可以下載別人的圖片用 PNG Info 或 img2img 的方式產圖(看不懂的話一樣看下方影片,播放就可以了):



[embed]https://youtu.be/c5xeERCwHgM?t=1713[/embed]



另外也可以到「https://civitai.com/」,裡面就有各路高手所分享的各種模型,我們這次用的 ChilloutMix 也是出自於此,但因為太受歡迎了作者本來下架模型(可能是怕被韓國經紀公司告),後來他放棄所有權直接送給站方。不過因為大家使用雲端算圖所以這些模型都是 Google Colab 用它的頻寬苦命下載的,大家並不需要下載,你只要點到你覺得很漂亮的模型裡面讀取別人作品的參數即可,有些模型要點進去需要註冊(因為一堆18禁的圖….):




使用 Google colab 免費玩 Stable Diffusion - 16

 


使用 Google colab 免費玩 Stable Diffusion - 16


以 ChilloutMix 裡面的範例舉例,點開圖片後,在右側就會有作者使用的正面/負面 Prompt、取樣方式、種子等資訊,你可以手動複製去自己的雲端 Stable Diffusion 貼上,也可以直接滑到最下方點選「Copy Generation Date」,就會複製裡面所有參數:




使用 Google colab 免費玩 Stable Diffusion - 17

 


使用 Google colab 免費玩 Stable Diffusion - 17


接著到你的 Stable Diffusion 上面的最上面框框貼上,再點擊斜下的箭頭,這樣系統就會自動幫你帶入所有參數,不用自己在那邊複製貼上:




使用 Google colab 免費玩 Stable Diffusion - 18

 


使用 Google colab 免費玩 Stable Diffusion - 18


使用 Google colab 免費玩 Stable Diffusion - 19

 


使用 Google colab 免費玩 Stable Diffusion - 19


接著就是算圖,簡單就能作出跟範例類似的圖片(很難一模一樣):




使用 Google colab 免費玩 Stable Diffusion - 21

 


使用 Google colab 免費玩 Stable Diffusion - 21


當然阿達強力建議大家,除了 COPY 別人的參數以外,自己也可以加入一些創意,如穿上和服(kimono)、漢服(HanFu)、比基尼(Bikini)…或是設定 man(變成男性)等等,個人也很建議大家去嘗試其他模型(如動漫款的 Anything 系列)原則上都是看你的看圖說故事能力,注意需要使用英文(強力建議使用 ChatGPT 翻譯),敘述詞間要用小寫的「,」隔開,大家可以看上面的教學影片:




使用 Google colab 免費玩 Stable Diffusion - 22

 


使用 Google colab 免費玩 Stable Diffusion - 22


使用 Google colab 免費玩 Stable Diffusion - 23

 


使用 Google colab 免費玩 Stable Diffusion - 23


最後放幾張阿達自己覺得不錯的作品分享給大家,另外我需要事先警告大家,這些真人模型大都是以現實存在的人物為範本,你算了自己看著爽沒什麼問題,但只要「商用」(如當作產品宣傳海報、開ONLYFANS),非常有可能被告,畢竟不管哪個國家的經紀公司都不希望自己的藝人肖像被濫用,更何況有以假亂真的問題,大家自己要注意一下喔!還有 AI 的手指大都有問題,如果要指定姿勢動作還要用到 ControlNet,怎麼修正我不多做介紹,如果反應好的話我再作教學:




nEO_IMG_04857-4046127785-smile,blue eyes,absurdres,official art,realistic,outdoors,((kimono))_blonde hair,perfect face,(white skin_1.2),perfect illuminat

 


nEO_IMG_04857-4046127785-smile,blue eyes,absurdres,official art,realistic,outdoors,((kimono))_blonde hair,perfect face,(white skin_1.2),perfect illuminat


nEO_IMG_04697-3602362425-best quality, ultra high res, (photorealistic_1.4),  makima _(chainsaw man_), 1girl, absurdres, bangs, indoors, black necktie, b

 


nEO_IMG_04697-3602362425-best quality, ultra high res, (photorealistic_1.4), makima (chainsaw man), 1girl, absurdres, bangs, indoors, black necktie, b


nEO_IMG_04797-3312555229-(8k, RAW photo, best quality, masterpiece_1.2), (realistic, photo-realistic_1.37),(Kpop idol), (aegyo sal_1),cute,professional l

 


nEO_IMG_04797-3312555229-(8k, RAW photo, best quality, masterpiece_1.2), (realistic, photo-realistic_1.37),(Kpop idol), (aegyo sal_1),cute,professional l


04812-1105088378-(8k, RAW photo, best quality, masterpiece_1.2), (realistic, photo-realistic_1.4), ultra-detailed, (Kpop idol),perfect detail ,

 


04812-1105088378-(8k, RAW photo, best quality, masterpiece_1.2), (realistic, photo-realistic_1.4), ultra-detailed, (Kpop idol),perfect detail ,


nEO_IMG_04819-1990219754-(8k, RAW photo, best quality, masterpiece_1.2), (realistic, photo-realistic_1.4), ultra-detailed, (Kpop idol),perfect detail ,

 


nEO_IMG_04819-1990219754-(8k, RAW photo, best quality, masterpiece_1.2), (realistic, photo-realistic_1.4), ultra-detailed, (Kpop idol),perfect detail ,


nEO_IMG_04821-1624216438-(8k, RAW photo, best quality, masterpiece_1.2), (realistic, photo-realistic_1.4), ultra-detailed, (Kpop idol),perfect detail ,

 


nEO_IMG_04821-1624216438-(8k, RAW photo, best quality, masterpiece_1.2), (realistic, photo-realistic_1.4), ultra-detailed, (Kpop idol),perfect detail ,


nEO_IMG_04822-758587571-(8k, RAW photo, best quality, masterpiece_1.2), (realistic, photo-realistic_1.4), ultra-detailed, (Kpop idol),perfect detail ,

 


nEO_IMG_04822-758587571-(8k, RAW photo, best quality, masterpiece_1.2), (realistic, photo-realistic_1.4), ultra-detailed, (Kpop idol),perfect detail ,


nEO_IMG_04830-197761009-(8k, RAW photo, best quality, masterpiece_1.2), (realistic, photo-realistic_1.4), ultra-detailed, (Kpop idol),perfect detail ,

 


nEO_IMG_04830-197761009-(8k, RAW photo, best quality, masterpiece_1.2), (realistic, photo-realistic_1.4), ultra-detailed, (Kpop idol),perfect detail ,




 






 






 




查看原始文章





 



 






 




延伸閱讀